package www.bplead.com.mydemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import www.bplead.com.controller.action.scrolldelete.entity.Goods;
import www.bplead.com.mydemo.R;
import www.bplead.com.mydemo.adapter.ScrollDeleteAdapter;
import www.bplead.com.mydemo.widget.ScrollDeleteListView;

/**
 * Created by wangyangzi on 2016/9/27.
 */
public class ScrollDeleteActivity extends AppCompatActivity implements View.OnClickListener {
    private static final String TAG = "ScrollDeleteActivity";

    ScrollDeleteListView scrollListView;
    ScrollDeleteAdapter scrollDeleteAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.scroll_delete);

        scrollListView = (ScrollDeleteListView) this.findViewById(R.id.scroll_delete_lv);

        Goods goods1 = new Goods();
        goods1.name = "牙膏";
        goods1.description = "黑人牙膏，中国人的牙膏...";
        Goods goods2 = new Goods();
        goods2.name = "脉动";
        goods2.description = "随时脉动回来...";
        List<Goods> goodsList = new ArrayList<>();
        goodsList.add(goods1);
        goodsList.add(goods2);

        scrollDeleteAdapter = new ScrollDeleteAdapter(this,goodsList);
        scrollListView.setAdapter(scrollDeleteAdapter);
    }

    @Override
    public void onClick(View v) {
    }
}
